import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;

public class task1 {
    public static void main(String[] args) throws IOException {
        HashMap<Integer,String> hashMap=new HashMap<Integer,String>();
        hashMap.put(1,"松子将");
        hashMap.put(2,"太难喝");
        hashMap.put(3,"积分磨");
        hashMap.put(4,"回复囧");
        BufferedWriter bw=new BufferedWriter(new FileWriter("d:\\a.txt"));
        Iterator iterator= (Iterator) hashMap.keySet().iterator();
        while (iterator.hasNext()){
            Integer key =(Integer) iterator.next();
            String value=hashMap.get(key);
            bw.write(key+"--"+value);
            bw.newLine();
            bw.flush();
        }

    }
}
